Problem: Evaluate $~~\int^{2\pi}_\pi x\sin\Big(\dfrac x2\Big) dx\,$. Choose 1 answer: Choose 1 answer: (Choice A) A $0$ (Choice B) B $2\pi-4$ (Choice C) C $4\pi-4$ (Choice D) D $6\pi$
Answer: We will solve this by integrating by parts. We know that $ \int u(x)v\,^\prime(x)dx = u(x)v(x)-\int u\,^\prime(x)v(x)dx\,$. We can rewrite this as $ \int u\ dv = uv-\int v\ du\,$. In this problem we will let $~u = x~$ and $~dv=\sin\Big(\dfrac x2\Big)\, dx\,$. Then $~du = dx~$ and $~v = \int \sin\Big(\dfrac x2\Big)\,dx = -2\,{\cos\Big(\dfrac x2\Big)}$. Integration by parts gives $ \int^{2\pi}_\pi x\sin\Big(\dfrac x2\Big) dx= x\cdot\Bigg(-2\cos\Big(\dfrac x2\Big)\Bigg)\Bigg]_\pi^{2\pi}-\int^{2\pi}_\pi-2\cos\Big(\dfrac x2\Big)dx$ $ ~~~~~= -2x\,\cos\Big(\dfrac x2\Big)+4\sin\Big(\dfrac x2\Big)\Bigg]^{2\pi}_\pi$ $ ~~~~~=\Big(4\pi+0\Big)-\Big(0+4\Big) = 4\pi-4\,$.